<include file="public@header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:url('Office/department')}">部门管理</a></li>
			<li><a href="{:url('Office/add_department')}">添加部门</a></li>
		</ul>
        <form class="well form-search" method="get" action="{:url('Office/department')}">
            部门名称:
            <input type="text" class="form-control" name="department_name" style="width: 140px;" value="{:input('request.department_name/s','')}" placeholder="请输入部门姓名">
            <input type="submit" class="btn btn-primary" value="搜索" />
            <a class="btn btn-danger" href="{:url('Office/department')}">清空</a>
        </form>
		<table class="table table-hover table-bordered">
			<thead>
				<tr>
					<th width="20%">部门名称</th>
					<th width="15%">部门主管</th>
					<th width="15%">归属部门</th>
                    <th width="15%">创建时间</th>
					<th width="10%">{:lang('ACTIONS')}</th>
				</tr>
			</thead>
			<tbody>
				<foreach name="results" item="vo">
				<tr>
					<td>{$vo.department_name}</td>
					<td>{$vo.user_nickname}</td>
					<td>
						<if ($vo.dept_type)==1>业务部
							<elseif ($vo.dept_type)==2/>
								财务部
							<elseif ($vo.dept_type)==3/>
								客服部
							<elseif ($vo.dept_type)==4/>
								工程部
							<elseif ($vo.dept_type)==5/>
								供货商
							<elseif ($vo.dept_type)==6/>
								人事部
							<elseif ($vo.dept_type)==7/>
								抵顶人
							<elseif ($vo.dept_type)==8/>
								代理商
							<elseif ($vo.dept_type)==9/>
								礼仪部
							<elseif ($vo.dept_type)==10/>
								总经办
						</if>
					</td>
                    <td> {$vo.add_time|date='Y-m-d H:i:s'}</td>
					<td>
                        <a href='{:url("Office/edit",array("id"=>$vo["id"]))}'>{:lang('EDIT')} </a> |
                        <a class="js-ajax-delete" href="{:url('Office/delete',array('id'=>$vo['id']))}">{:lang('DELETE')}</a>
					</td>
				</tr>
				</foreach>
			</tbody>
		</table>
		<div class="pagination">{$page}</div>
	</div>
	<script type="text/javascript" src="__STATIC__/js/admin.js?v={:time()}"></script>
</body>
</html>